﻿using System;
using System.Collections.Generic;
using System.Runtime.Serialization;
using System.Text;

namespace AppBlank.Models
{
    #region 无法转换

    //public class KuaiYinShi
    //{
    //    public int code { get; set; }
    //    public string data { get; set; }
    //}

    //public class KuaiYinShiVideo
    //{
    //    public string desc { get; set; }
    //    public string avatar { get; set; }
    //    public string video_url { get; set; }
    //    public object unique_id { get; set; }
    //    public string nickname { get; set; }
    //    public int short_id { get; set; }
    //    public object share_url { get; set; }
    //    public string video_img { get; set; }
    //    public Statistics statistics { get; set; }
    //    public Comment[] comments { get; set; }
    //    public object tb_link { get; set; }


    //    // public string videoimg { set { this.videoimg = value; } get { return "http:" + this.video_url; } }
    //}

    //public class Statistics
    //{
    //    public int zan { get; set; }
    //    public int comment { get; set; }
    //    public int share { get; set; }
    //    public int play { get; set; }
    //}

    //public class Comment
    //{
    //    public string text { get; set; }
    //    public int create_time { get; set; }
    //    public string nickname { get; set; }
    //    public int zan { get; set; }
    //    public string avatar { get; set; }
    //    public int short_id { get; set; }
    //} 
    #endregion


    [DataContractAttribute(IsReference = true)]
    public class KuaiYinShi
    {
        [DataMember(Name = "code")]
        public int code { get; set; }
        [DataMember(Name = "data")]
        public List<KuaiYinShiVideo> data { get; set; }
    }

    [DataContractAttribute]
    public class KuaiYinShiVideo
    {
        public string desc { get; set; }
        public string avatar { get; set; }
        [DataMember(Name = "video_url")]
        public string video_url { get; set; }
        public object unique_id { get; set; }
        [DataMember(Name = "nickname")]
        public string nickname { get; set; }
        public int short_id { get; set; }
        public object share_url { get; set; }
        [DataMember(Name = "video_img")]
        public string video_img { get; set; }
        [DataMember(Name = "statistics")]
        public Statistics statistics { get; set; }
        public Comment[] comments { get; set; }
        public object tb_link { get; set; }

        [DataMember(Name = "videoimg")]
        public string videoimg { get { return "http:" + this.video_img; } }

        [DataMember(Name = "videourl")]
        public string videourl { get { return "http:" + this.video_url; } }
    }

    [DataContractAttribute]
    public class Statistics
    {
        public int zan { get; set; }
        public int comment { get; set; }
        public int share { get; set; }
        public int play { get; set; }
    }

    [DataContractAttribute]
    public class Comment
    {
        public string text { get; set; }
        public int create_time { get; set; }
        public string nickname { get; set; }
        public int zan { get; set; }
        public string avatar { get; set; }
        public int short_id { get; set; }
    }


}
